
        SR780 Utilities Disk  v2.10
------------------------------------------------------------------------
Outline:
    Why File Conversion?
    Supported External File Types
        ASCII Files
        SDF Files
        Matlab  MAT-Files
        Universal File Format
        SR780 File Types
        .78D Files
        Buffers: .78C and .78W Files
    Diskfiles and Remote Interface Files: Using SRMERG.EXE
    Using the File Conversion Utilities
    Using SRT780 to Convert .78D to ASCII
    Using SRT780 to Convert .78W to ASCII
    Using SRT780 to Convert .78C to ASCII
    Using SRT780 to Convert .78D to MAT-File
    Using SRT780 to Convert .78D to Universal File Format
    Using SRBUF to Convert ASCII to .78C
    Using SDFTOSR to Convert SDF to .78D

------------------------------------------------------------------------
    Why File Conversion?

Data from the SR780 will often need to be exported to external programs such as
spreadsheets, plotting programs, or modal-analysis programs. In addition, it is
often convenient to be able to import data prepared by external programs into
the SR780 for display and comparison. In order to meet both these needs the SR780
is shipped with a suite of file conversion utilities designed to import and export
data as flexibly as possible.
Stanford Research Systems is committed to supporting as many file formats as
possible-as a result we are constantly adding new formats. Contact Stanford
Research Systems to obtain a list of supported programs and file formats and to
obtain a free upgrade to the latest file conversion utilities.

------------------------------------------------------------------------
  Supported External File Types
Four different file types are currently supported by the SR780 file utilities.

ASCII Files
    ASCII files consist of plain ASCII text. ASCII files written by the SR780
    file conversion utilities consist of an alphanumeric header giving setup
    information followed by a number of columns of data values. Columns are
    separated by 'TAB' characters and each line is terminated with a carriage-
    return line-feed pair. For input, the conversion utilities expect values to
    be separated by any whitespace character with no leading header data.
    Characters after the last expected data value are ignored.

SDF Files
    Standard Data Format, or SDF, is a file format supported by Hewlett-Packard
    instruments and is designed to allow data sharing among various analyzers.
    The SR780 file conversion utilities include a program (SDFTOSR.EXE) to
    translate version 3.0 SDF files to SRS trace (.78D) files. Note that because
    of specific differences between HP analyzers and the SR780 it is impossible
    to exactly match instrument setups on the two analyzers, however, measurement
    data is transferred exactly.

Matlab  MAT-Files
    MATLAB is a popular program for doing mathematics and for the analysis of
    numeric data. Although it easy to import ASCII data directly into MATLAB, it
    is faster and more efficient to use the binary MAT-File format. The conversion
    utilities include the capability of directly converting a SR780 trace file
    into a binary MAT-File.

Universal File Format
    The Universal File Format is a specification for an ASCII database capable
    of describing the geometry, degree-of-freedom, and measurement data used in
    structural analysis. Most modal analysis programs are capable of importing
    measurement data formatted in Universal File Format. The SR780 file conversion
    utilities include the capability of converting SR780 trace files into Universal
    File Type 58 (Function at Nodal DOF) data sets.


  SR780 File Types
.78D Files
    .78D files, or trace files, are generated using the <Trace to Disk>
    or <Display to Disk> softkeys or by using the TGET?i remote command. The
    trace file contains both the trace data, and a complete
    record of the instrument's setup when the trace was stored.

Buffers: .78C and .78W Files
    The SR780 uses 4 user-allocable buffers to store large amounts of data. These
    are the Channel 1 capture buffer, the Channel 2 capture buffer, the waterfall
    buffer, and the arbitrary waveform buffer. Capture and arbitrary waveform
    buffers have the same format and can be saved to disk as .78C files using the
    <Buffer to Disk> softkey or the AGET?i and CGET?i,j commands. Waterfall buffers
    have a different format and can be saved to disk as .78W files using the
    <Buffer to Disk> softkey or the WGET?i command. Utilities are supplied to
    convert ASCII files to .78C files and to convert both .78C and .78W files
    into ASCII files.

------------------------------------------------------------------------
    Diskfiles and Remote Interface Files: Using SRMERG.EXE

Because buffers saved to the SR780's internal disk drive with the Buffer to Disk
softkey can span several disks, and because it is necessary to record information
regarding the total number of disks in the stored file, buffers saved to disk with
the Buffer to Disk softkey have a slightly different format from the corresponding
buffers which are downloaded using the AGET?i, CGET?i,j or WGET? remote interface
commands. For instance, it would not be possible to save the arbitrary waveform
buffer to disk with the <Buffer to Disk> softkey and then upload  the saved file
using the APUT command.  To provide a means for converting between the diskfile
format and the remote interface file format the SRMERG.EXE utility is provided.
SRMERG detects the type of its input file and converts its output file to the
other format. In the above example, we could run SRMERG on the diskfile and the
resulting file would be suitable for uploading with APUT.
To use SRMERG type:

    SRMERG  infile oufile

Note that both and input and output file names must be provided to SRMERG. If
either the infile or outfile is a multidisk floppy file, the program will prompt
for insertion of each disk in the correct sequence.


------------------------------------------------------------------------
  Using the File Conversion Utilities

The disk supplied with the SR780 contains three file conversion utilities.

1) SRT780.EXE converts .78D files to ASCII, MAT-File and UFF formats as well as
               converting .78W and .78C files to ASCII only.

2) SDFTOSR.EXE converts SDF files to .78D files

3) SRBUF.EXE   converts ASCII files to .78C files.

------------------------------------------------------------------------
    Using SRT780 to Convert .78D to ASCII

SRT780  infile [outfile] [/N] [/A] [/D]

infile  specifies the input .78D filename. Both the filename and extension must be
        explicitly specified. Wildcard filenames are allowed. For instance
        SRS00?.78D matches SRS000.78D through SRS009.78D.

outfile optionally specifies the name of the ASCII output file. If outfile is
        omitted an output file with the same name as the input file and an
        extension of 'ASC' will be created.  The default output file consists of
        a header section with instrument setup information followed by 4 columns
        of data. The first column gives the data X-axis values, the second
        and third columns give the real and imaginary parts of the data, and
        the 4th column gives the value of the selected view of the data.

/N      suppresses the output of the fourth data column (view data).

/A      appends the ASCII data to the existing outfile instead of overwriting.

/D      suppresses the output of the header and creates and ASCII file with data only.

An example of a piece of a converted file follows:
		Chirp Source: Display A
		Arb Src Amp: 100.00 %
		Arb Src Buf: Arb. Buffer
		Arb Src Rate: 262.1 kHz
		Arb Src Start: 0
		Arb Src Len:    4 kPts
		Input Source: Analog
		****DATA BEGINS****
            x         Real                Imag            LogMag
            0    -0.0008602436       -3.41401e-006       -61.3075
            256  -0.0005861814      -7.750024e-006       -64.6386
            512  -0.0001727123      -3.370421e-006      -75.25188
            768  -1.977445e-005      1.887184e-006       -94.03854
            1024 -4.01275e-006       4.875117e-006       -103.9937
            1280  1.377309e-006      9.745545e-006       -100.138

------------------------------------------------------------------------
    Using SRT780 to Convert .78W to ASCII

    SRT780 infile [outfile] [/N] [/A] [/D] [/Watrci-trcj] [/Wbtrci-trcj]

infile  specifies the .78W waterfall buffer files to be converted

outfile optionally specifies the name of the output ascii file. If outfile is
        omitted an output file with the same name as the input file and an extension
        of 'ASC' will be created. The format is similar to the ASCII file
        structure described for converted .78D files however SRT780 includes
        data for all the traces in a user-specified range within the waterfall
        buffer. Since waterfall buffers include data for both display A and
        display B, the ASCII output file will contain a setting header for
        display A followed by data for the display A waterfall traces followed
        by a setting header for display B followed by the display B waterfall
        traces.

/N      suppresses the output of the fourth data column (view data).

/A      appends the ASCII data to the existing outfile instead of overwriting.

/D      suppresses the output of the setting header for display A and display B.

/Wa and /Wb specify the range of traces for display A and display B that will be
        included in the output. For instance, /Wa14-38 instructs the program to
        translate traces 14 through 38 of the display A waterfall buffer. If
        this information is not given on the command line it will be prompted
        for by the program.

------------------------------------------------------------------------
    Using SRT780 to Convert .78C to ASCII

    SRT780 infile [outfile]  [/A] [/D]

infile  specifies the name of the .78C capture buffer file to be converted

outfile optionally specifies the name of the output ascii file. If outfile is
        omitted an output file with the same name as the input file and an
        extension of 'ASC' will be created. The output consists of a header
        giving settings specific to the capture buffer followed by a single
        column of data values representing data from the capture buffer.

/A      appends the ASCII data to the existing outfile instead of overwriting.

/D      suppresses the output of the capture buffer header.

An example of a piece of a converted .78C file follows:
		Time:    14 : 17 : 26
		Date:     7 /  3 / 96
		Length:    2 kPts
		Base Freq:   102.4 kHz
		Sampling Freq:	262.1 kHz
		Input Range Ch1:  0 dBV
		Input Range Ch2:  0 dBV
			-0.4461670
			-0.4826355
			-0.4906464
			-0.4691315
			-0.4194641
			-0.3446960
			-0.2493286
            -0.1390076

------------------------------------------------------------------------
    Using SRT780 to Convert .78D to MAT-File

    SRT780 infile [outfile] /M

infile  specifies the input .78D filename. Both the filename and extension must
        be explicitly specified.

outfile optionally specifies the name of the .MAT output file. If outfile is
        omitted an output file with the same name as the input file and an
        extension of 'MAT' will be created.


The converted MAT-file can be loaded into the MATLAB workspace using the 'load'
command. The MAT-file contains one matrix with 4 columns and a number of rows
equal to the number of points in the original .78D file. The first column
contains X-axis values, the second and third columns contain the real and
imaginary parts of the measurement data, and the 4th column contains the value
of the selected view.

------------------------------------------------------------------------
    Using SRT780 to Convert .78D to Universal File Format

    SRT780 infile [oufile] /U [/A] [Fcfgfile] [/Pi,j,k,l,m,n]

infile  specifies the .78D file to be converted. Infile may contain wildcard
        characters if a set of .78D files is to be converted.

outfile may be either the name of a single file, in which case all input files
        will be translated and appended to the single output file, or may be the
        wildcard *.ext, where each input file will be translated into an output
        file with the same name and the extension ext.

/A      specifies that output should be appended to an existing file instead of
        overwriting.

/Fcfgfile specifies the name of a  configuration file. A configuration file is
        a text file containing a list of input file names optionally followed by
        a set of nodal DOF parameters. SRT780 will convert any files specified
        in the configuration file in addition to any files specified by infile.
        If DOF parameters are given in the input file they override any DOF
        parameters stored with the .78D file.

/Pi,j,k,l,m,n specifies a list of nodal DOF parameters to use in the conversion
        which will override DOF parameters stored in the input .78D files.
        i,j,k,l,m, n are respectively the response node name, id#, direction
        followed by the reference node name, id#, and direction. Node direction
        is specified according to the following table.
            i   Node Direction
            0   -Theta(Z)
            1   -Theta(Y)
            2   -Theta(X)
            3   -Z
            4   -Y
            5   -X
            6   Scalar (no direction)
            7   X
            8   Y
            9   Z
            10  +Theta(X)
            11  +Theta(Y)
            12  +Theta(Z)

Example:
    C:>SRT780 SRS??.78D OUT.UFF /U /A /Fcfile

where cfile contains the lines:
    XYZ.78D NODE1,1,8,NODE2,2,8
    QXR.78D

will translate all files in the current directory matching SRS??.78D using the
DOF information stored in those files into a single output file OUT.UFF. In
addition, because a configuration file is given on the command line, SRT780
will translate the file XYZ.78D with the DOF information specified in the
configuration file (response name = NODE1, response id#=1, response direction =+X,
reference node=NODE2, reference id=2, reference direction =+Y) and the file
QXY.78D will be translated using DOF information stored in the input file.
Output from these to files will be appended to OUT.UFF.


------------------------------------------------------------------------
    Using SRBUF to Convert ASCII to .78C

    SRBUF infile outfile [/Bn] [/Li] [/Sn] [/Xi] [/Yi]

infile  specifies the ASCII file to be converted . The file consists of a list
        of ASCII floating point numbers separated by whitespace characters. If
        the file is to be uploaded to a capture buffer, the floating point
        values correspond to a fraction of the full scale input voltage specified
        in the capture header. If the file is to be uploaded to the arbitrary
        waveform buffer then a value of 1.000 corresponds to a one volt output
        at the source when the Arb Amplitude softkey is set to %100.0.

outfile specifies the name of the converted  .78C file. The resultant file is
        suitable for uploading to arbitrary waveform buffer using the APUT?
        command or to the capture buffers using the CPUT?i command. To load the
        output file from a floppy disk it is necessary to convert it to floppy
        format with the SRMERG utility.

The remainder of the switches allow the user to set information in the capture
header corresponding to the file.

/Bn     specifies the Base Frequency. 0=100 kHz, 1=102.4 kHz

/Li     specifies the buffer length in kiloPoints

/Sn     specifies the capture sampling frequency. Fs = Base*2.56/(2^n).

/Xi and /Yi specify the Ch1 and Ch2 full scale input ranges respectively in dBV.
        These values are ignored if the fle is uploader to the arb waveform buffer.

------------------------------------------------------------------------
    Using SDFTOSR to Convert SDF to .78D

    SDFTOSR  infile outfile /Vn

infile  specifies the SDF file to be converted .

outfile specifies the name of the converted  .78D file.

/Vn     specifies the version number of your SR780 instrument.  You can find the
        version number by pressing the <system><show version> softkeys on your
        SR780.  For example, use /V109 for SR780 instrument version 109.

Note that since there is not a one to one correspondence between fields in the
SDF file and settings of the SR780, an exact transfer of instrument settings is
not feasible. However, SDFTOSR is a reliable means of importing data stored in
an SDF file into the SR780.
